package com.ankang.art.mapper;

import com.ankang.art.dto.ExamineeDto;
import com.ankang.art.dto.QueryStudentDto;
import com.ankang.art.vo.Examinee;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

@Mapper
@Component
public interface ExamineeMapper {


//    @Select("select * from examinee")
//    public List<Examinee> getAllExaminees();

//    @Update("UPDATE examinee SET is_deleted = 0 WHERE id=#{id}")
    public void deleteExaminees(@Param("idCard")String idCard);

//    @Insert("insert into examinee(name,id_card,age,gender,school_name) values(#{name},#{idCard},#{age},#{gender},#{schoolName})")
    void saveExaminees(ExamineeDto examineeDto);

//    @Update("UPDATE examinee SET name=#{name},id_card=#{idCard},age=#{age},gender=#{gender},school_name=#{schoolName} WHERE id=#{id}")
    void updateExaminees(ExamineeDto examineeDto);

    List<Examinee> getExaminees(@Param("name")String name, @Param("gender")Integer gender,
                                @Param("idCard")String idCard, @Param("schoolName")String schoolName,@Param("status") String status);

    List<Examinee> getExamTest();

    List<Examinee> addExamTest();

    Examinee getExamineeById(Integer id);

}
